Method and Apparatus for Information Exchange in Online Charging

ABSTRACT

A method and an apparatus for information exchange in online charging in order to reduce frequency of information exchange between a Charging Trigger Function (CTF) device and an Online Charging System (OCS), and reduce a pressure of information transmission between the CTF device and the OCS, where the method includes receiving, by a CTF device, a credit control answer (CCA) message that carries a non-real-time Trigger and sent by an OCS, recording, by the CTF device, charging information before and after a corresponding event of the non-real-time Trigger happens each time before sending a credit control request (CCR) message to the OCS next time, and sending, by the CTF device, the CCR message to the OCS.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent Application No. PCT/CN2015/086941 filed on Aug. 14, 2015, which claims priority to Chinese Patent Application No. 201410660401.X filed on Nov. 18, 2014. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the field of electronic information technologies, and in particular, to a method and an apparatus for information exchange in online charging.

BACKGROUND

As an increasing quantity of online services are used, an operator needs to monitor, in real time, a status of using an online service by a user, and settle, in real time, a tariff for the online service used by the user. Currently, an Online Charging System (OCS) is often used for online charging.

To ensure accuracy of online charging performed using the OCS, a network device that bears a Charging Trigger Function (CTF) needs to report charging information to the OCS in real time. For example, after receiving a credit control request (CCR) message sent by the network device that bears the CTF, the OCS sends, to the network device that bears the CTF, a credit control answer (CCA) message carrying a trigger condition (Trigger). The network device that bears the CTF monitors, in real time, whether a charging event corresponding to the Trigger happens, and when the charging event happens, the network device that bears the CTF reports charging information or re-authorization request information to the OCS using a dynamic Trigger mechanism such that the OCS can obtain, in real time, the charging information when the charging event happens.

However, in an actual application, Quality of Service (QoS) of a user terminal often changes, a location of a user terminal is often updated, and so on, and consequently charging events happen frequently within a short time. Therefore, the network device that bears the CTF needs to frequently report charging information to the OCS, increasing frequency of information exchange between the network device that bears the CTF and the OCS, and increasing a pressure of information transmission between the network device that bears the CTF and the OCS.

SUMMARY

Embodiments of the present disclosure provide a method and an apparatus for information exchange in online charging in order to reduce frequency of information exchange between a CTF device and an OCS, and reduce a pressure of information transmission between the CTF device and the OCS.

To achieve the foregoing objectives, the following technical solutions are used in the embodiments of the present disclosure.

According to a first aspect, an embodiment of the present disclosure provides a method for information exchange in online charging, where the method includes receiving, by a CTF device, a CCA message that carries a non-real-time Trigger sent by an OCS, where the CCA message responds to a CCR message that carries a quota request sent by the CTF device, the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS, recording, before sending a CCR message to the OCS next time, by the CTF device, charging information before and after the corresponding event of the non-real-time Trigger happens each time, and sending, by the CTF device, the CCR message to the OCS, where the CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time.

With reference to the first aspect, in a first possible implementation manner of the first aspect, recording charging information before and after the corresponding event of the non-real-time Trigger happens each time includes storing, each time when detecting that the corresponding event of the non-real-time Trigger happens, by the CTF device, quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, and restarting to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, before sending, by the CTF device, the CCR message to the OCS, the method further includes separately placing the charging information before and after the corresponding event of the non-real-time Trigger happens each time into different containers, where the CCR message includes at least two containers, and the charging information includes one or more of the quota usage information recorded by the CTF device, the non-real-time Trigger, or the information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of the following a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network public land mobile network (PLMN) changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, before sending, by the CTF device, the CCR message to the OCS, and when at least two corresponding events of the non-real-time Trigger happen simultaneously, the method further includes placing charging information before the simultaneous events happen into a same container.

With reference to the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

With reference to the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, before the sending, by the CTF device, the CCR message to the OCS, the method further includes determining, by the CTF device, whether same information exists in the charging information in the different containers, and placing, outside the containers, the same information in the charging information in the different containers if the same information exists.

With reference to the second possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

With reference to the second possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

With reference to any one of the second to the seventh possible implementation manners of the first aspect, in an eighth possible implementation manner of the first aspect, the container further includes the non-real-time Trigger if the information in the container is information before the corresponding event of the non-real-time Trigger happens, or the container does not include any non-real-time Trigger if the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

With reference to any one of the second to the eighth possible implementation manners of the first aspect, in a ninth possible implementation manner of the first aspect, the containers included in the CCR message separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

With reference to any one of the first aspect or the first to the ninth possible implementation manners of the first aspect, in a tenth possible implementation manner of the first aspect, the CTF device sends the CCR message to the OCS when the event happens if corresponding events of a real-time Trigger and the non-real-time Trigger carried in the CCA message sent by the OCS are the same.

With reference to any one of the first aspect or the first to the tenth possible implementation manners of the first aspect, in an eleventh possible implementation manner of the first aspect, the CTF device has received the non-real-time Trigger sent by the OCS, and the method further includes replacing, by the CTF device, the received non-real-time Trigger with the new non-real-time Trigger when the CTF device receives again a CCA message that carries a new non-real-time Trigger and that is sent by the OCS.

With reference to any one of the first aspect or the first to the eleventh possible implementation manners of the first aspect, in a twelfth possible implementation manner of the first aspect, the method further includes receiving, by the CTF device, a CCA message that carries a null non-real-time Trigger sent by the OCS, where the null non-real-time Trigger does not correspond to any event, and invalidating, by the CTF device, a currently used non-real-time Trigger.

According to a second aspect, an embodiment of the present disclosure provides a method for information exchange in online charging, where the method includes receiving, by an OCS, a CCR message sent by a CTF device and that carries a quota request, determining, by the OCS, a non-real-time Trigger according to the quota request, and sending a CCA message carrying the non-real-time Trigger to the CTF device, where the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS, and receiving, by the OCS, a CCR message sent by the CTF device and that carries charging information, where the CCR message carrying the charging information includes charging information before and after the corresponding event of the non-real-time Trigger happens each time.

With reference to the second aspect, in a first possible implementation manner of the second aspect, the CCR message carrying the charging information includes at least two containers, and the charging information before and after the corresponding event of the non-real-time Trigger happens each time is separately placed into different containers. The charging information includes one or more of quota usage information recorded by the CTF device, the non-real-time Trigger, or information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes. The information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

With reference to the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

With reference to any one of the second to the fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, the information in the container is information before the corresponding event of the non-real-time Trigger happens if the container further includes the non-real-time Trigger, or the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS if the container does not include any non-real-time Trigger.

With reference to any one of the first to the fifth possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the containers included in the CCR message separately carry one sequence number, sequence numbers of the containers are arranged in time sequence, and the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

According to a third aspect, an embodiment of the present disclosure provides an apparatus for information exchange in online charging, where the apparatus includes a receiving module configured to receive a CCA message that carries a non-real-time Trigger sent by an OCS, where the CCA message responds to a CCR message that carries a quota request sent by the CTF device, the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS, a storage module configured to record, before a CCR message is sent to the OCS next time, charging information before and after the corresponding event of the non-real-time Trigger happens each time, and a sending module configured to send the CCR message to the OCS, where the CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time.

With reference to the third aspect, in a first possible implementation manner of the third aspect, the storage module is further configured to separately place the charging information before and after the corresponding event of the non-real-time Trigger happens each time into different containers before the CTF device sends the CCR message to the OCS, where the CCR message includes at least two containers, and the charging information includes one or more of quota usage information recorded by the CTF device, the non-real-time Trigger, or information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of the following a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes. The information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, when at least two corresponding events of the non-real-time Trigger happen simultaneously, the storage module is further configured to place charging information before the simultaneous events happen into a same container.

With reference to the first possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens, or information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and that are of the non-real-time Trigger sent by the OCS, or information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS, and the apparatus further includes a processing module configured to determine whether same information exists in the charging information in the different containers before the CTF device sends the CCR message to the OCS, and place, outside the containers, the same information in the charging information in the different containers if the same information exists.

With reference to any one of the third aspect or the first to the third possible implementation manners of the third aspect, in a fourth possible implementation manner of the third aspect, the container further includes the non-real-time Trigger if the information in the container is information before the corresponding event of the non-real-time Trigger happens, or the container does not include any non-real-time Trigger if the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

With reference to any one of the third aspect or the first to the fourth possible implementation manners of the third aspect, in a fifth possible implementation manner of the third aspect, the containers included in the CCR message separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

With reference to any one of the third aspect or the first to the fifth possible implementation manners of the third aspect, in a sixth possible implementation manner of the third aspect, the receiving module is further configured to receive again a CCA that carries a new non-real-time Trigger sent by the OCS, where the CTF device has received the non-real-time Trigger sent by the OCS, and the processing module is further configured to replace the received non-real-time Trigger with the new non-real-time Trigger.

With reference to any one of the third aspect or the first to the sixth possible implementation manners of the third aspect, in a seventh possible implementation manner of the third aspect, the receiving module is further configured to receive a CCA message that carries a null non-real-time Trigger sent by the OCS, where the null non-real-time Trigger does not correspond to any event, and the processing module is further configured to invalidate a currently used non-real-time Trigger.

According to a fourth aspect, an embodiment of the present disclosure provides an apparatus for information exchange in online charging, where the apparatus includes a receiving module configured to receive a CCR message sent by a CTF device and that carries a quota request, a processing module configured to determine a non-real-time Trigger according to the quota request, and a sending module configured to send a CCA message carrying the non-real-time Trigger to the CTF device, where the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to an OCS, where the receiving module is further configured to receive a CCR message sent by the CTF device and that carries charging information, where the CCR message includes charging information before and after the corresponding event of the non-real-time Trigger happens each time.

With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the CCR message carrying the charging information includes at least two containers, and the charging information before and after the corresponding event of the non-real-time Trigger happens each time is separately placed into different containers, and the charging information includes one or more of quota usage information recorded by the CTF device, the non-real-time Trigger, or information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of the following a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens, or information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and that are of the non-real-time Trigger sent by the OCS, or information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

With reference to any one of the fourth aspect or the first and the second possible implementation manners of the fourth aspect, in a third possible implementation manner of the fourth aspect, the information in the container is information before the corresponding event of the non-real-time Trigger happens if the container further includes the non-real-time Trigger, or the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS if the container does not include any non-real-time Trigger.

With reference to any one of the first to the third possible implementation manners of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the containers included in the CCR message separately carry one sequence number, sequence numbers of the containers are arranged in time sequence, and the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

According to the method and the apparatus for information exchange in online charging provided in the embodiments of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that the CTF device does not need to report the charging information to the OCS each time the corresponding event of the non-real-time Trigger happens. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the present disclosure more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. The accompanying drawings in the following description show merely some embodiments of the present disclosure, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

FIG. 1 is a flowchart of a method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 2 is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 3 and FIG. 4 are a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 5 and FIG. 6 are a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 7 and FIG. 8 are a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 9 is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 10A is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 10B is a flowchart of information exchange in a specific application scenario according to an embodiment of the present disclosure;

FIG. 11 is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 12 is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 13 is a flowchart of another method for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 14 is a schematic structural diagram of an apparatus for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 15 is a schematic structural diagram of another apparatus for information exchange in online charging according to an embodiment of the present disclosure;

FIG. 16 is a schematic structural diagram of a CTF device according to an embodiment of the present disclosure; and

FIG. 17 is a schematic structural diagram of an OCS device according to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. The described embodiments are merely some but not all of the embodiments of the present disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

The embodiments of the present disclosure may be applied to an OCS. The OCS includes at least a CTF device and an OCS. The CTF device is a network device that can bear a CTF. For example, all devices that can bear the CTF, such as a Gateway General Packet Radio Service (GPRS) support node (GGSN), a packet data network (PDN) gateway (P-GW), and a Packet Data Gateway (PDG) may be referred to as the CTF device in the embodiments of the present disclosure. It should be noted that a specific type and a device model of the CTF device may be selected according to a specific network environment. For example, in a GPRS, the GGSN may serve as the CTF device. In an Evolved Packet Core (EPC) network, the P-GW may serve as the CTF device. In a Wireless Local Area Network (WLAN) an enhanced PDG (ePDG) may serve as the CTF device. A manner of information exchange between the CTF device and the OCS and a type of information transmitted between the CTF device and the OCS are not limited in the embodiments of the present disclosure. For convenience of description, the description is provided using an example in which the CTF device sends a CCR message to the OCS, and the OCS sends a CCA message to the CTF device. Both the CCR message and the CCA message may carry information or data content that needs to be exchanged in the embodiments of the present disclosure. For example, the CCR message may carry a quota request of a specified rating group, and the CCA message may carry quota authorization information and a Trigger such that the CTF device monitors a corresponding event of the Trigger according to the received CCA message, and sends the CCR message to the OCS according to the event that happens, where the CCR message carries charging information encapsulated for reporting, and the OCS sends, to the CTF device, the CCA message used to confirm that the reported charging information has been received.

An embodiment of the present disclosure provides a method for information exchange in online charging. As shown in FIG. 1, the method includes the following steps.

Step 101: A CTF device receives a CCA message that carries a non-real-time Trigger sent by an OCS.

The CCA message responds to a CCR message that carries a quota request sent by the CTF device, the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS.

It should be noted that, in the non-real-time Trigger, the corresponding event may be one or more preset events, for example, may include one or more in Table 1:

TABLE 1 A user location changes. Allocated QoS changes. An accessed wireless network changes. A serving gateway (SGSN or SGW) address changes. A serving gateway (SGSN or SGW) type changes. A time zone in which a user is located changes. A serving network PLMN changes. User group information changes.

For example, the CTF device receives a CCA message sent by the OCS and indicates that a user location changes, or a CCA message sent by the OCS and indicates that user group information changes and a time zone in which a user is located changes.

It should be noted that the non-real-time Trigger may be implemented in multiple manners.

For example, in this embodiment of the present disclosure, the non-real-time Trigger is indicated using a new Trigger format (herein, a Record-Trigger is used as an example) different from an existing Trigger format:

-   -   Trigger::=<Attriribute-Value Pairs (AVP) Header:1264>         -   *[Trigger-Type]     -   Record-Trigger::=<AVP Header:XXXX>         -   *[Trigger-Type]

For another example, in this embodiment of the present disclosure, an existing Trigger format may be changed in order to add a child AVP to indicate a non-real-time Trigger (herein, a Deferred-Trigger-Type is used as an example), where the non-real-time Trigger includes one or more specific non-real-time Triggers (includes one or more child Trigger-Types):

-   -   Trigger::=<AVP Header:XXXX>         -   *[Trigger-Type]         -   [Deferred-Trigger-Type]     -   *[Trigger-Type]

The non-real-time Trigger is included in the Deferred-Trigger-Type. After receiving an AVP, the CTF device removes the non-real-time Trigger included in the Deferred-Trigger-Type from a list of Triggers included in a Trigger-Type child AVP of the Trigger AVP, and the remaining other Triggers are used as real-time Triggers.

For another example, in this embodiment of the present disclosure, an existing Trigger format may be changed in order to indicate a non-real-time Trigger by means of grouping (herein, a non-real-time Trigger is indicated by means of a Non-Real-Trigger, and a real-time Trigger is indicated by means of a Real-Trigger):

-   -   Trigger::=<AVP Header:1264>         -   Real-Trigger::=<AVP Header:XXXX>             -   *[Trigger-Type]         -   Non-Real-Trigger::=<AVP Header:XXXX>             -   *[Trigger-Type]

Optionally, after receiving the CCA message that carries the non-real-time Trigger sent by the OCS, the CTF device may further determine, according to a service usage status of a user, whether happening of the corresponding event needs to be monitored, and the CTF device ignores the non-real-time Trigger if the happening of the corresponding event does not need to be monitored.

Step 102: Before sending a CCR message to the OCS next time, the CTF device records charging information before and after a corresponding event of the non-real-time Trigger happens each time.

Before the CTF device sends the CCR message to the OCS next time, when the corresponding event of the non-real-time Trigger happens, the CTF device may obtain the charging information recorded in the CTF device when the corresponding event of the non-real-time Trigger happens, set the charging information as the charging information before the corresponding event of the non-real-time Trigger happens, restart a charging information recording process after obtaining the charging information before the corresponding event of the non-real-time Trigger happens, and set charging information recorded in restarted recording as the charging information after the corresponding event of the non-real-time Trigger happens. In this embodiment of the present disclosure, a granularity used by the CTF device to record the charging information may be a Rating Group granularity, or a Rating Group granularity and a Service identifier (ID) granularity. For a network device that bears the CTF, a recording granularity is kept the same as a reporting granularity, and the recording granularity may be a reporting granularity specified in a charging rule delivered by a Policy and Charging Rules Function (PCRF).

Step 103: The CTF device sends the CCR message to the OCS.

The CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and the CTF sends the CCR message to the OCS when a reporting condition is satisfied. The reporting condition herein may be, a quota is used up, a quota expires, a corresponding event of a real-time Trigger happens, or the like.

For example, when a corresponding event of a real-time Trigger corresponding to a rating group happens, the CTF device encapsulates charging information before and after the event happens each time. For example, charging information of the Rating Group granularity is encapsulated if the reporting granularity is the Rating Group granularity, and charging information of the intersection set of the Rating Group granularity and the Service ID granularity is encapsulated if the reporting granularity is an intersection set of the Rating Group granularity and the Service ID granularity.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, charging information before and after the event happens can be first recorded when a corresponding event of a non-real-time Trigger happens, and charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS when the charging information needs to be reported to an OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 1, step 102 may be implemented as 1021 shown in FIG. 2:

Step 1021: Each time when detecting that the corresponding event of the non-real-time Trigger happens, the CTF device stores quota usage information of a rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, and restarts to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

Before the CTF device sends the CCR message to the OCS next time, when the corresponding event of the non-real-time Trigger happens, the CTF device may store the quota usage information of the rating group corresponding to the non-real-time Trigger and/or the information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, obtain quota usage information and/or information about the corresponding event of the non-real-time Trigger, which is recorded in the CTF device when the corresponding event of the non-real-time Trigger happens, set the obtained information as quota usage information and/or information about the corresponding event of the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens, after obtaining the quota usage information and/or the information about the corresponding event of the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens, restart a charging information recording process, and restart to record the quota usage information and/or the information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, and before sending a CCR message to the OCS next time, the CTF device stores quota usage information of a rating group corresponding to the non-real-time Trigger and/or information about a corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, restarts to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens, and sends the CCR message carrying recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 1 or FIG. 2, as shown in FIG. 3 or FIG. 4, before step 103, the method may further include step 104.

Step 104: Separately place the charging information before and after the corresponding event of the non-real-time Trigger happens each time into different containers.

The CCR message includes at least two containers.

The charging information includes one or more of the quota usage information recorded by the CTF device, the non-real-time Trigger, or the information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

In this embodiment of the present disclosure, the CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and the CCR message includes at least two containers. The CTF device separately places the charging information before and after the corresponding event of the non-real-time Trigger happens into different containers. If the corresponding event of the non-real-time Trigger happens for multiple times, a corresponding quantity of containers may be used to record charging information before the corresponding event of the non-real-time Trigger happens each time, and one container records information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 3 or FIG. 4, before the CTF device sends the CCR message to the OCS, the method may be further implemented as either implementation manner shown in FIG. 5 or FIG. 6.

Step 105: When at least two corresponding events of the non-real-time Trigger happen simultaneously, place charging information before the simultaneous events happen into a same container.

When multiple corresponding events of the non-real-time Trigger happen simultaneously, the CTF device combines and records charging information corresponding to the multiple corresponding events of the non-real-time Triggers in order to report the recorded information as one container to the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 3 or FIG. 4, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

It should be noted that, no matter whether the OCS has delivered a non-real-time Trigger corresponding to an event, information corresponding to all non-real-time Triggers is reported in each container.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, separately place the charging information into different containers, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before the event happens each time can be carried in different containers in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 3 or FIG. 4, before the CTF device sends the CCR message to the OCS, the method may be further implemented as an implementation manner shown in FIG. 7 or FIG. 8.

Step 106: The CTF device determines whether same information exists in the charging information in the different containers.

Step 107: If the same information exists in the charging information in the different containers, place, outside the containers, the same information in the charging information in the different containers.

The charging information in the different containers is not processed if no same information exists in the charging information in the different containers.

In this embodiment of the present disclosure, the CTF device performs determining on charging information, that is, determines whether same information exists in charging information in different containers. The same charging information is placed outside the containers and reported as information at a Packet Switched (PS)-information level if some charging information in different containers and reported in a same CCR message is the same, thereby preventing a large amount of repetitive information from being reported.

For example, if user time zones corresponding to charging information in different containers and reported in a same CCR message are the same, the information is reported in an AVP at a PS-information level, and the containers do not carry user time zone information any more. If the user time zones are different, time zone information is encapsulated in different containers for reporting. Each Service-Data-Record may correspond to a set of charging information before or after one non-real-time Trigger or multiple simultaneous non-real-time Triggers happen. If values of a parameter, such as Location, in all Service-Data-Records at the PS-information level are the same, one Location AVP is carried only at the PS-information level, and the Location AVP is no longer carried in any Service-Data-Record.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, separately place the charging information into different containers, place, outside the containers, same information in the charging information in the different containers, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded and separately placed into different containers, then same information in the charging information in the different containers can be placed outside the containers, reducing storage resources, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 3 or FIG. 4, information in the container may include the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

In this embodiment of the present disclosure, the current reporting period is a time interval from a time when charging information is reported previous time to a time when charging information is reported next time.

Charging information in a container is divided into quota usage information and information that corresponds to the non-real-time Trigger. At the time of reporting, the container carries only information about a corresponding event that has happened and that is of the non-real-time Trigger delivered by the OCS and quota usage information, and does not carry information about another corresponding event that does not happen or of a non-real-time Trigger or information about another corresponding event of a non-real-time Trigger that is not delivered by the OCS. The information about the corresponding event of the non-real-time Trigger not carried in the container may be carried outside the container.

For example, a non-real-time Trigger delivered by the OCS is that a Location changes. It is assumed that the Location changes once in a reporting period, and then, when reporting is triggered, only information and quota usage information before and after the Location changes are encapsulated into a container, and the container does not carry information about a corresponding event of another non-real-time Trigger. A value of the corresponding event of the other non-real-time Trigger is carried at the PS-information level, and the value of the corresponding event of another non-real-time Trigger is current information. Details are described in Table 2.

TABLE 2 Specific code Code meaning Service-Data-Record :: = Quota usage information <AVP Header: XXX> [ Accounting-Input-Octets ] [ Accounting-Output-Octets ] [ Local-Sequence-Number ] [ Rating-Group ] [ Change-Time ] [ Service-Identifier ] [ Service-Specific-Info ] [ Time-Usage ] [ Trigger ] Non-real-time Trigger: CHANGE_IN_LOCATION [ third Generation Partnership Project For information corresponding (3GPP)-User-Location-Info ] to a non-real-time Trigger, [ 3GPP2-BSID ] only a value corresponding to a Location is reported.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, place charging information before simultaneous events happen into a same container, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, charging information before simultaneous events happen can be placed into a same container, reducing a quantity of occupied containers, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 3 or FIG. 4, the information in the container may further include the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

Further, when the non-real-time Trigger happens, a container carries values, before the non-real-time Trigger happens, of all corresponding events of the non-real-time Trigger sent by the OCS. Herein, the values include a value of a corresponding event that happens and of the non-real-time Trigger and a value of a corresponding event that does not happen and of the non-real-time Trigger, and a value of a corresponding event of another non-real-time Trigger not delivered by the OCS is not carried.

Further, a container into which charging information in a time period from a time when the last corresponding event of the non-real-time Trigger happens to a reporting time point is encapsulated may carry values, at the time of reporting, of all corresponding events of the non-real-time Trigger sent by the OCS, or may not carry a value of any corresponding event of the non-real-time Trigger. The value not carried in the container and of the corresponding event of the non-real-time Trigger is carried in a parameter at the PS-information level.

For example, a non-real-time Trigger delivered by the OCS is that a Location changes, and QoS changes. It is assumed that the Location changes once in a reporting period, and then, when reporting is triggered, a Location value and a QoS value before and after the Location changes are encapsulated into a container. Information about a corresponding event of another non-real-time Trigger not delivered by the OCS, for example, a time zone changes, or a serving gateway changes, is carried at the PS-information level, and a value of the corresponding event of the other non-real-time Trigger is current information. Details are described in Table 3.

TABLE 3 Specific code Code meaning Service-Data-Record :: = <AVP Header: XXX> Before a Location [ Accounting-Input-Octets ] changes, for [ Accounting-Output-Octets ] information [ Local-Sequence-Number ] corresponding [ Rating-Group ] to a non-real-time [ Change-Time ] Trigger, information [ Service-Identifier ] corresponding to the [ Service-Specific-Info ] Location and QoS [ Time-Usage ] is encapsulated. [ Trigger ] [ CHANGE_IN_LOCATION ] [ 3GPP-User-Location-Info ] [ QoS-information ] Service-Data-Record :: = <AVP Header: XXX> After a Location [ Accounting-Input-Octets ] changes, for [ Accounting-Output-Octets ] information [ Local-Sequence-Number ] corresponding [ Rating-Group ] to a non-real-time [ Change-Time ] Trigger, information [ Service-Identifier ] corresponding to the [ Service-Specific-Info ] Location and QoS is [ Time-Usage ] encapsulated. [Trigger ] [ CHANGE_IN_LOCATION ] [ 3GPP-User-Location-Info ] [ QoS-information ]

In this embodiment of the present disclosure, on the basis of the foregoing implementation manner, the container further includes the non-real-time Trigger if the information in the container is information before the corresponding event of the non-real-time Trigger happens, or the container does not include any non-real-time Trigger if the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and charging information recorded by the CTF device after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens and information after the event happens for the last time and before a CTF device sends a CCR message to an OCS can be first recorded, and when the charging information needs to be reported to the OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing the CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, the containers included in the CCR message may separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the OCS differentiates the containers in time sequence according to the sequence numbers of the containers. Each container carries one sequence number such that the OCS can differentiate containers according to sequence numbers. The OCS may further identify, according to Trigger information carried in a container, that is, whether a Trigger-type is carried, a container in which charging information after the last non-real-time Trigger changes is placed. The CTF device places charging information corresponding to multiple simultaneous non-real-time Triggers into a same container such that the OCS can learn simultaneous events.

According to the method for information exchange in online charging that is provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before a corresponding event of the non-real-time Trigger happens each time, where containers included in the CCR message separately carry one sequence number, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, where containers included in a CCR message separately carry one sequence number such that an OCS differentiates the containers in time sequence according to sequence numbers of the containers, and when the charging information needs to be reported to the OCS, charging information before the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

If corresponding events of a real-time Trigger and the non-real-time Trigger carried in the CCA message sent by the OCS are the same, the CTF device sends the CCR message to the OCS when the event happens, that is, the CTF device uses the event as the real-time Trigger.

The CTF device replaces the received non-real-time Trigger with the new non-real-time Trigger when the CTF device receives again a CCA message that carries a new non-real-time Trigger sent by the OCS.

The previously delivered non-real-time Trigger is replaced with a new non-real-time Trigger, that is, the previously delivered non-real-time Trigger is invalid if the OCS has delivered a non-real-time Trigger to the CTF device within this charging session declaration period, and currently the non-real-time Trigger is still valid.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and when the CTF device receives again a CCA message that carries a new non-real-time Trigger sent by the OCS, the CTF device replaces the received non-real-time Trigger with the new non-real-time Trigger. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manners shown in FIG. 1 to FIG. 8, using FIG. 1 as an example, the method may be further implemented as an implementation manner shown in FIG. 9.

Step 108: The CTF device receives a CCA message that carries a null non-real-time Trigger sent by the OCS.

The null non-real-time Trigger does not correspond to any event.

Step 109: The CTF device invalidates a currently used non-real-time Trigger.

The CTF device invalidates all currently used non-real-time Triggers if the OCS delivers the CCA message carrying the null non-real-time Trigger to the CTF device, where the null non-real-time Trigger does not carry a corresponding event of any specific non-real-time Trigger.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and the CTF device validates a currently used non-real-time Trigger when the CTF device receives a CCA message that carries a null non-real-time Trigger sent by the OCS. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

An embodiment of the present disclosure provides a method for information exchange in online charging. As shown in FIG. 10A, the method includes the following steps.

Step 201: An OCS receives a CCR message sent by a CTF device and that carries a quota request.

Step 202: The OCS determines a non-real-time Trigger according to the quota request, and sends a CCA message carrying the non-real-time Trigger to the CTF device.

The non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the event happens, and the CTF device is not triggered to report the recorded charging information to the OCS.

Step 203: The OCS receives a CCR message that carries charging information sent by the CTF device.

The CCR message includes charging information before and after the corresponding event of the non-real-time Trigger happens each time.

As shown in FIG. 10B, an original process of specific information exchange between the CTF device and the OCS is as follows.

The CTF device sends a CCR message to the OCS, and the OCS sends a CCA message to the CTF device, where the CCR message may carry a quota request of a specified rating group, and the CCA message may carry quota authorization information and a Trigger. The CTF device monitors a corresponding event of the Trigger according to the received CCA message, and sends a CCR message to the OCS when the corresponding event of the Trigger happens, where the CCR message carries charging information encapsulated for reporting. The OCS sends, to the CTF device, a CCA message used to confirm that the reported charging information has been received.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 10A, step 203 may be implemented as step 2031 shown in FIG. 11.

Step 2031: Each time when detecting that a corresponding event of the non-real-time Trigger happens, the CTF device stores quota usage information of a rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, and restarts to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, and before sending a CCR message to the OCS next time, the CTF device can store quota usage information of a rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, restart to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens, record charging information before and after the corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 10A or FIG. 11, the CCR message carrying the charging information includes at least two containers, and the charging information before and after the corresponding event of the non-real-time Trigger happens each time is separately placed into different containers.

The charging information includes one or more of the quota usage information recorded by the CTF device, the non-real-time Trigger, or the information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

Information in the container may include the quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

The information in the container may further include multiple non-real-time Triggers. This means that corresponding events of the multiple non-real-time Triggers happen simultaneously, and charging information in the container is charging information before the corresponding events of the multiple non-real-time Triggers happen.

The information in the container may further include the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

The information in the container may further include the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS. In other words, no matter whether a corresponding event of a non-real-time Trigger sent by the OCS happens, the non-real-time Trigger is included in the container as long as the non-real-time Trigger is delivered by the OCS.

In this embodiment of the present disclosure, if the container further includes the non-real-time Trigger, the information in the container includes quota usage information before the corresponding event of the non-real-time Trigger happens.

If the container does not include any non-real-time Trigger, the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

According to the method for information exchange in online charging that is provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, separately place the charging information into different containers, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in different containers in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

The containers included in the CCR message separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the sequence numbers of the containers are used by the OCS to differentiate the containers in time sequence.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, where containers included in the CCR message separately carry one sequence number, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, where containers included in a CCR message separately carry one sequence number such that an OCS differentiates the containers in time sequence according to sequence numbers of the containers, and when the charging information needs to be reported to the OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 10A, the method may further include an implementation manner shown in FIG. 12.

Step 204: If determining a new non-real-time Trigger again, the OCS sends a CCA message carrying the new non-real-time Trigger to the CTF device such that the CTF device replaces the received non-real-time Trigger with the new non-real-time Trigger.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and when the CTF device receives again a CCA message that carries a new non-real-time Trigger sent by the OCS, the CTF device replaces the received non-real-time Trigger with the new non-real-time Trigger. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

In this embodiment of the present disclosure, on the basis of the implementation manner shown in FIG. 10A, the method may further include an implementation manner shown in FIG. 13.

Step 205: The OCS sends a CCA message carrying a null non-real-time Trigger to the CTF device.

The null non-real-time Trigger does not correspond to any event such that after receiving the CCA message that carries the null non-real-time Trigger, the CTF device invalidates a currently used non-real-time Trigger.

According to the method for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time, and when the CTF device receives a CCA message that carries a null non-real-time Trigger sent by the OCS, the CTF device validates a currently used non-real-time Trigger. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

An embodiment of the present disclosure further provides an apparatus for information exchange in online charging 15 and that may be applied to a CTF device. As shown in FIG. 14, the apparatus for information exchange in online charging 15 may include a receiving module 151, a storage module 152, a sending module 153, and a processing module 154.

The receiving module 151 is configured to receive a CCA message that carries a non-real-time Trigger sent by an OCS, where the CCA message responds to a CCR message that carries a quota request sent by a CTF device, the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the event happens, and the CTF device is not triggered to report the recorded charging information to the OCS.

The storage module 152 is configured to record, before a CCR message is sent to the OCS next time, charging information before and after the corresponding event of the non-real-time Trigger happens each time.

The sending module 153 is configured to send the CCR message to the OCS, where the CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time.

Optionally, each time when it is detected that the corresponding event of the non-real-time Trigger happens, the storage module 152 is further configured to store quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, and restart to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

Optionally, before the CTF device sends the CCR message to the OCS, the storage module 152 is further configured to separately place the charging information before and after the corresponding event of the non-real-time Trigger happens each time into different containers, where the CCR message includes at least two containers, and the charging information includes one or more of the quota usage information recorded by the CTF device, the non-real-time Trigger, or the information about the corresponding event of the non-real-time Trigger, the non-real-time Trigger includes one or more of the following a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

Optionally, the storage module 152 is further configured to place charging information before the simultaneous events happen into a same container when at least two corresponding events of the non-real-time Trigger happen simultaneously.

In an optional implementation solution, information in the container may include the quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

In another optional implementation solution, information in the container includes the quota usage information before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

In still another optional implementation solution, information in the container includes the quota usage information before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

The processing module 154 is configured to determine whether same information exists in the charging information in the different containers before the CTF device sends the CCR message to the OCS, and place, outside the containers, the same information in the charging information in the different containers if the same information exists.

In the foregoing implementation solution, the container further includes the non-real-time Trigger if the information in the container is information before the corresponding event of the non-real-time Trigger happens, or the container does not include any non-real-time Trigger if the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

Optionally, the containers included in the CCR message separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

Optionally, the sending module 153 is further configured to send the CCR message to the OCS when the event happens if corresponding events of a real-time Trigger and the non-real-time Trigger carried in the CCA message sent by the OCS are the same.

Optionally, the receiving module 151 is further configured to receive again a CCA that carries a new non-real-time Trigger sent by the OCS, where the CTF device has received the non-real-time Trigger sent by the OCS, and the processing module 154 is further configured to replace the received non-real-time Trigger with the new non-real-time Trigger.

Optionally, the receiving module 151 is further configured to receive a CCA message that carries a null non-real-time Trigger sent by the OCS, where the null non-real-time Trigger does not correspond to any event, and the processing module 154 is further configured to invalidate a currently used non-real-time Trigger.

According to the apparatus for information exchange in online charging 15 provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

An embodiment of the present disclosure further provides an apparatus for information exchange in online charging 16 and that may be applied to an OCS device. As shown in FIG. 15, the apparatus for information exchange in online charging 16 may include a receiving module 161, a processing module 162, and a sending module 163.

The receiving module 161 is configured to receive a CCR message sent by a CTF device and that carries a quota request.

The processing module 162 is configured to determine a non-real-time Trigger according to the quota request.

The sending module 163 is configured to send a CCA message carrying the non-real-time Trigger to the CTF device, where the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the event happens, and the CTF device is not triggered to report the recorded charging information to an OCS.

The receiving module 161 is further configured to receive a CCR message sent by the CTF device and that carries charging information, where the CCR message includes charging information before and after the corresponding event of the non-real-time Trigger happens each time.

The CCR message carrying the charging information includes at least two containers, and the charging information before and after the corresponding event of the non-real-time Trigger happens each time is separately placed into different containers.

The charging information includes one or more of quota usage information recorded by the CTF device, the non-real-time Trigger, or information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

In an optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

In another optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information corresponding to all non-real-time Triggers sent by the OCS and that have happened in a current reporting period.

In still another optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

In the foregoing implementation solution, the information in the container is information before the corresponding event of the non-real-time Trigger happens if the container further includes the non-real-time Trigger, or the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS if the container does not include any non-real-time Trigger.

Optionally, the containers included in the CCR message separately carry one sequence number, sequence numbers of the containers are arranged in time sequence, and the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

According to the apparatus for information exchange in online charging provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

An embodiment of the present disclosure further provides a CTF device 170. As shown in FIG. 16, the CTF device 170 includes at least one processor 171, such as a central processing unit (CPU), at least one network interface 174 or a user interface 173, a memory 175, and at least one communications bus 172. The communications bus 172 is configured to implement connection and communication between these components. Optionally, the CTF device 170 further includes the user interface 173, including a display, a keyboard, or a clicking device (for example, a mouse, a trackball, a touch panel, or a touch display screen). The memory 175 may include a high-speed random access memory (RAM), and may further include a non-volatile memory, for example, at least one magnetic disk memory. The memory 175 may optionally include at least one storage apparatus far away from the processor 171.

In some implementation manners, the memory 175 stores the following elements, an executable module or a data structure, or a subset thereof, or an extension set thereof, an operating system 1751, including various system programs and configured to implement various basic services and process a hardware-based task, and an application program 1752, including various application programs and configured to implement various application services.

The application program 1752 includes but is not limited to a receiving module (not shown), a storage module (not shown), a sending module (not shown), and a processing module (not shown).

For specific implementation of the modules in the application program 1752, refer to the corresponding modules in the embodiment shown in FIG. 14, and details are not described herein.

Further, the network interface 174 is configured to receive a CCA message that carries a non-real-time Trigger sent by an OCS, where the CCA message responds to a CCR message that carries a quota request sent by the CTF device 170, the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device 170 is triggered to record charging information before and after the corresponding event happens, and the CTF device 170 is not triggered to report the recorded charging information to the OCS. The memory 175 is configured to record, before a CCR message is sent to the OCS next time, charging information before and after the corresponding event of the non-real-time Trigger happens each time, and the network interface 174 is further configured to send the CCR message to the OCS, where the CCR message includes the charging information before and after the corresponding event of the non-real-time Trigger happens each time.

Optionally, the memory 175 may be further configured to each time when it is detected that the corresponding event of the non-real-time Trigger happens, store quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about the corresponding event of the non-real-time Trigger before the non-real-time Trigger happens, and restart to record quota usage information and/or information about the corresponding event of the non-real-time Trigger after the non-real-time Trigger happens.

Optionally, before the CTF device 170 sends the CCR message to the OCS, the memory 175 is further configured to separately place the charging information before and after the corresponding event of the non-real-time Trigger happens each time into different containers, where the CCR message includes at least two containers, and the charging information includes one or more of the quota usage information recorded by the CTF device 170, the non-real-time Trigger, or the information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

Optionally, the memory 175 is further configured to place charging information before the simultaneous events happen into a same container when at least two corresponding events of the non-real-time Trigger happen simultaneously.

Optionally, before the CTF device 170 sends the CCR message to the OCS, the processor 171 is configured to determine whether same information exists in the charging information in the different containers, and place, outside the containers, the same information in the charging information in the different containers if the same information exists.

In an optional implementation solution, information in the container may include the quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

In another optional implementation solution, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and of the non-real-time Trigger sent by the OCS.

In still another optional implementation solution, information in the container includes the quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

In the foregoing implementation solution, the container further includes the non-real-time Trigger if the information in the container is information before the corresponding event of the non-real-time Trigger happens, or the container does not include any non-real-time Trigger if the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS.

Optionally, the containers included in the CCR message separately carry one sequence number, and sequence numbers of the containers are arranged in time sequence such that the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

Optionally, the network interface 174 is further configured to send the CCR message to the OCS when the event happens if corresponding events of a real-time Trigger and the non-real-time Trigger carried in the CCA message sent by the OCS are the same.

Optionally, the network interface 174 is further configured to receive again a CCA that carries a new non-real-time Trigger sent by the OCS, where the CTF device 170 has received the non-real-time Trigger sent by the OCS, and the processor 171 is further configured to replace the received non-real-time Trigger with the new non-real-time Trigger.

Optionally, the network interface 174 is further configured to receive a CCA message that carries a null non-real-time Trigger sent by the OCS, where the null non-real-time Trigger does not correspond to any event, and the processor 171 is further configured to invalidate a currently used non-real-time Trigger.

According to the CTF device 170 provided in this embodiment of the present disclosure, the CTF device 170 can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device 170 to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

An embodiment of the present disclosure further provides an OCS device 180. As shown in FIG. 17, the OCS device 180 includes at least one processor 181, such as a CPU, at least one network interface 184 or a user interface 183, a memory 185, and at least one communications bus 182. The communications bus 182 is configured to implement connection and communication between these components. Optionally, the OCS device 180 further includes the user interface 183, including a display, a keyboard, or a clicking device (for example, a mouse, a trackball, a touch panel, or a touch display screen). The memory 185 may include a high-speed RAM, and may further include a non-volatile memory, for example, at least one magnetic disk memory. The memory 185 may optionally include at least one storage apparatus far away from the processor 181.

In some implementation manners, the memory 185 stores the following elements, an executable module or a data structure, or a subset thereof, or an extension set thereof, an operating system 1851, including various system programs and configured to implement various basic services and process a hardware-based task, and an application program 1852, including various application programs and configured to implement various application services.

The application program 1852 includes but is not limited to a receiving module (not shown), a processing module (not shown), and a sending module (not shown).

For specific implementation of the modules in the application program 1852, refer to the corresponding modules in the embodiment shown in FIG. 15, and details are not described herein.

Further, the network interface 184 is configured to receive a CCR message sent by a CTF device and that carries a quota request. The processor 181 is configured to determine a non-real-time Trigger according to the quota request. The network interface 184 is configured to send a CCA message carrying the non-real-time Trigger to the CTF device, where the non-real-time Trigger corresponds to one or more quotas of a rating group, and the non-real-time Trigger refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to an OCS, and the network interface 184 is further configured to receive a CCR message that is sent by the CTF device and that carries charging information, where the CCR message carrying the charging information includes charging information before and after the corresponding event of the non-real-time Trigger happens each time.

The CCR message carrying the charging information includes at least two containers, and the charging information before and after the corresponding event of the non-real-time Trigger happens each time is separately placed into different containers.

The charging information includes one or more of quota usage information recorded by the CTF device, the non-real-time Trigger, or information about the corresponding event of the non-real-time Trigger. The non-real-time Trigger includes one or more of a user location changes, an allocated QoS value changes, an accessed wireless network type changes, a serving gateway address changes, a serving gateway type changes, a time zone in which a user is located changes, or a serving network PLMN changes, and the information about the corresponding event of the non-real-time Trigger includes at least one or more values of the user location, the allocated QoS value, the accessed wireless network type, the serving gateway address, the serving gateway type, the time zone in which the user is located, or the serving network PLMN.

In an optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger and/or information about all corresponding events of the non-real-time Trigger before the non-real-time Trigger happens.

In another optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events that have happened in a current reporting period and that are of the non-real-time Trigger sent by the OCS.

In still another optional implementation solution, information in the container includes quota usage information of the rating group corresponding to the non-real-time Trigger before the corresponding event of the non-real-time Trigger happens and information about all corresponding events of the non-real-time Trigger sent by the OCS.

In the foregoing implementation solution, the information in the container is information before the corresponding event of the non-real-time Trigger happens if the container further includes the non-real-time Trigger, or the information in the container is information after the corresponding event of the non-real-time Trigger happens for the last time and before the CTF device sends the CCR message to the OCS if the container does not include any non-real-time Trigger.

Optionally, the containers included in the CCR message separately carry one sequence number, sequence numbers of the containers are arranged in time sequence, and the OCS differentiates the containers in time sequence according to the sequence numbers of the containers.

According to the OCS device 180 provided in this embodiment of the present disclosure, a CTF device can receive a CCA message that carries a non-real-time Trigger sent by an OCS, before sending a CCR message to the OCS next time, record charging information before and after a corresponding event of the non-real-time Trigger happens each time, and send the CCR message carrying the recorded charging information to the OCS such that a CCR message reported each time by the CTF device to the OCS carries the charging information before and after the corresponding event of the non-real-time Trigger happens each time. Compared with a solution in which charging information is reported in real time each time an event happens, in the present disclosure, when a corresponding event of a non-real-time Trigger happens, charging information before and after the event happens can be first recorded, and when the charging information needs to be reported to an OCS, charging information before and after the event happens each time can be carried in a CCR message and then reported to the OCS, thereby preventing a CTF device from frequently reporting the charging information to the OCS, reducing frequency of information exchange between the CTF device and the OCS, and reducing a pressure of information transmission between the CTF device and the OCS.

The embodiments in this specification are all described in a progressive manner. For same or similar parts in the embodiments, reference may be made to these embodiments, and each embodiment focuses on a difference from other embodiments. Especially, a device embodiment is basically similar to a method embodiment, and therefore is described briefly. For related parts, reference may be made to partial descriptions in the method embodiment.

A person of ordinary skill in the art may understand that all or a part of the processes of the methods in the embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. The processes of the methods in the embodiments are performed when the program runs. The storage medium may include a magnetic disk, an optical disc, a Read-Only Memory (ROM), a RAM, or the like.

The foregoing descriptions are merely specific implementation manners of the present disclosure, but are not intended to limit the protection scope of the present disclosure. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present disclosure shall fall within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims. 

What is claimed is:
 1. A method for information exchange in online charging, comprising: receiving, by a charging trigger function (CTF) device, a credit control answer (CCA) message that carries a non-real-time trigger condition from an online charging system (OCS), wherein the CCA message responds to a credit control request (CCR) message that carries a quota request from the CTF device, wherein the non-real-time trigger condition corresponds to one or more quotas of a rating group, and wherein the non-real-time trigger condition refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS; recording, by the CTF device, the charging information before and after the corresponding event of the non-real-time trigger condition happens each time before sending a CCR message to the OCS next time; and sending, by the CTF device, the CCR message to the OCS, wherein the CCR message comprises the charging information before and after the corresponding event of the non-real-time trigger condition happens each time.
 2. The method according to claim 1, wherein recording the charging information before and after the corresponding event of the non-real-time trigger condition happens each time comprises: storing, by the CTF device, quota usage information of the rating group corresponding to the non-real-time trigger condition or information about the corresponding event of the non-real-time trigger condition before the non-real-time trigger condition happens and each time when detecting that the corresponding event of the non-real-time trigger condition happens; and restarting to record quota usage information or information about the corresponding event of the non-real-time trigger condition after the non-real-time trigger condition happens.
 3. The method according to claim 1, wherein before sending the CCR message to the OCS, the method further comprises separately placing the charging information before and after the corresponding event of the non-real-time trigger condition happens each time into different containers, wherein the CCR message comprises at least two containers, wherein the charging information comprises: one or more of quota usage information the non-real-time trigger condition; or information about the corresponding event of the non-real-time trigger condition recorded by the CTF device, wherein the non-real-time trigger condition comprises one or more of the following: a user location changes; an allocated Quality of Service (QoS) value changes; an accessed wireless network type changes; a serving gateway address changes; a serving gateway type changes; a time zone in which a user is located changes; or a serving network public land mobile network (PLMN) changes, and wherein the information about the corresponding event of the non-real-time trigger condition comprises: at least one or more values of the user location; the allocated QoS value; the accessed wireless network type; the serving gateway address; the serving gateway type; the time zone in which the user is located; or the serving network PLMN.
 4. The method according to claim 3, wherein before sending the CCR message to the OCS, and when at least two corresponding events of the non-real-time trigger condition happen simultaneously, the method further comprises placing the charging information before the simultaneous events happen into a same container.
 5. The method according to claim 3, wherein information in the container comprises: the quota usage information of the rating group corresponding to the non-real-time trigger condition; or information about all corresponding events of the non-real-time trigger condition before the non-real-time trigger condition happens.
 6. The method according to claim 3, wherein before sending the CCR message to the OCS, the method further comprises: determining, by the CTF device, whether same information exists in the charging information in the different containers; and placing, outside the containers, the same information in the charging information in the different containers when the same information exists.
 7. The method according to claim 3, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens; and information about all corresponding events that have happened in a current reporting period and of the non-real-time trigger condition from the OCS.
 8. The method according to claim 3, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens; and information about all corresponding events of the non-real-time trigger condition from the OCS.
 9. The method according to claim 3, wherein a container further comprises the non-real-time trigger condition when the information in the container is information before the corresponding event of the non-real-time trigger condition happens, and wherein the container does not comprise any non-real-time trigger condition when the information in the container is information after the corresponding event of the non-real-time trigger condition happens for the last time and before the CTF device sends the CCR message to the OCS.
 10. A method for information exchange in online charging, comprising: receiving, by an online charging system (OCS), a credit control request (CCR) message from a charging trigger function (CTF) device and carries a quota request; determining, by the OCS, a non-real-time trigger condition according to the quota request; sending a credit control answer (CCA) message carrying the non-real-time trigger condition to the CTF device, wherein the non-real-time trigger condition corresponds to one or more quotas of a rating group, and wherein the non-real-time trigger condition refers to when a corresponding event happens, the CTF device is triggered to record charging information before and after the corresponding event happens, and the CTF device is not triggered to report the recorded charging information to the OCS; and receiving, by the OCS, a CCR message from the CTF device and that carries the charging information, wherein the CCR message carrying the charging information comprises the charging information before and after the corresponding event of the non-real-time trigger condition happens each time.
 11. The method according to claim 10, wherein the CCR message carrying the charging information comprises at least two containers, wherein the charging information before and after the corresponding event of the non-real-time trigger condition happens each time is separately placed into different containers, wherein the charging information comprises: one or more of quota usage information; the non-real-time trigger condition; or information about the corresponding event of the non-real-time trigger condition recorded by the CTF device, wherein the non-real-time trigger condition comprises one or more of the following: a user location changes; an allocated Quality of Service (QoS) value changes; an accessed wireless network type changes; a serving gateway address changes; a serving gateway type changes; a time zone in which a user is located changes; or a serving network public land mobile network (PLMN) changes, and wherein the information about the corresponding event of the non-real-time trigger condition comprises: at least one or more values of the user location; the allocated QoS value; the accessed wireless network type; the serving gateway address; the serving gateway type; the time zone in which the user is located; or the serving network PLMN.
 12. The method according to claim 11, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition; or information about all corresponding events of the non-real-time trigger condition before the non-real-time trigger condition happens.
 13. The method according to claim 11, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens; and information about all corresponding events that have happened in a current reporting period and of the non-real-time trigger condition from the OCS.
 14. The method according to claim 11, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens; and information about all corresponding events of the non-real-time trigger condition from the OCS.
 15. The method according to claim 12, wherein the information in the container is information before the corresponding event of the non-real-time trigger condition happens when the container further comprises the non-real-time trigger condition, and wherein the information in the container is information after the corresponding event of the non-real-time trigger condition happens for the last time and before the CTF device sends the CCR message to the OCS when the container does not comprise any non-real-time trigger condition.
 16. The method according to claim 11, wherein the at least two containers comprised in the CCR message separately carry one sequence number, wherein sequence numbers of the at least two containers are arranged in time sequence, and wherein the OCS differentiates the at least two containers in time sequence according to the sequence numbers of the at least two containers.
 17. An apparatus for information exchange in online charging, comprising: a processor; and a computer-readable storage medium coupled to the processor and configured to store programming instructions for execution by the processor, wherein the programming instructions cause the processor to be configured to: receive a credit control answer (CCA) message that carries a non-real-time trigger condition from an online charging system (OCS), wherein the CCA message responds to a credit control request (CCR) message that carries a quota request and from the apparatus, wherein the non-real-time trigger condition corresponds to one or more quotas of a rating group, and wherein the non-real-time trigger condition refers to when a corresponding event happens, the apparatus is triggered to record charging information before and after the corresponding event happens, and the apparatus is not triggered to report the recorded charging information to the OCS; record the charging information before and after the corresponding event of the non-real-time trigger condition happens each time before a CCR message is sent to the OCS next time; and send the CCR message to the OCS, wherein the CCR message comprises the charging information before and after the corresponding event of the non-real-time trigger condition happens each time.
 18. The apparatus according to claim 17, wherein the programming instructions further cause the processor to be configured to separately place the charging information before and after the corresponding event of the non-real-time trigger condition happens each time into different containers before the CTF device sends the CCR message to the OCS, wherein the CCR message comprises at least two containers, wherein the charging information comprises: one or more of quota usage information; the non-real-time trigger condition; or information about the corresponding event of the non-real-time trigger condition that is recorded by the apparatus, wherein the non-real-time trigger condition comprises one or more of the following: a user location changes; an allocated Quality of Service (QoS) value changes; an accessed wireless network type changes; a serving gateway address changes; a serving gateway type changes; a time zone in which a user is located changes; or a serving network public land mobile network (PLMN) changes, and wherein the information about the corresponding event of the non-real-time trigger condition comprises: at least one or more values of the user location; the allocated QoS value, the accessed wireless network type; the serving gateway address, the serving gateway type; the time zone in which the user is located; or the serving network PLMN.
 19. The apparatus according to claim 18, wherein when at least two corresponding events of the non-real-time trigger condition happen simultaneously, the programming instructions further cause the processor to be configured to place charging information before the simultaneous events happen into a same container.
 20. The apparatus according to claim 18, wherein information in a container comprises: quota usage information of the rating group corresponding to the non-real-time trigger condition or information about all corresponding events of the non-real-time trigger condition before the non-real-time trigger condition happens; the quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens and the information about all corresponding events that have happened in a current reporting period and of the non-real-time trigger condition from the OCS; or the quota usage information of the rating group corresponding to the non-real-time trigger condition before the corresponding event of the non-real-time trigger condition happens and the information about all corresponding events of the non-real-time trigger condition from the OCS, and wherein the programming instructions further cause the processor to be configured to: determine whether same information exists in the charging information in the different containers before sending the CCR message to the OCS; and place, outside the containers, the same information in the charging information in the different containers when the same information exists. 